Skip to main content

"chess"

Index

Classes

Chessboard

Chessboard:

constructor

  • Parameters

    • elem: HTMLElement
    • options: { orientation: black | white; position: start; sprite: { cache: boolean; size: number; url: string }; style: any }
      • orientation: black | white
      • position: start
      • sprite: { cache: boolean; size: number; url: string }
      • style: any

    Returns Chessboard

props

props: { animationDuration: number }

Type declaration

  • animationDuration: number

enableMoveInput

  • enableMoveInput(cb, turn): void
  • Parameters

    • cb: (event) => void
      • turn: black | white

      Returns void

    setPosition

    • setPosition(fen, _): void
    • Parameters

      • fen: string
      • _: boolean

      Returns void

    MoveInputEvent

    MoveInputEvent:

    constructor

    square

    square: never

    squareFrom

    squareFrom: never

    squareTo

    squareTo: never

    type

    type: moveStart | moveDone

    Variables

    constBORDER_TYPE

    BORDER_TYPE: { thin: thin }

    Type declaration

    • thin: thin

    constCOLOR

    COLOR: { black: black; white: white }

    Type declaration

    • black: black
    • white: white

    constINPUT_EVENT_TYPE

    INPUT_EVENT_TYPE: { moveDone: any; moveStart: any }

    Type declaration

    • moveDone: any
    • moveStart: any